package com.example.fireDet.serviceImpl;

import com.example.fireDet.entity.ImageTrackTable;
import com.example.fireDet.mapper.ImageTrackTableMapper;
import com.example.fireDet.model.FindByDate;
import com.example.fireDet.service.ImageTrackTableService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class ImageTrackTableImpl implements ImageTrackTableService {
    @Resource
    ImageTrackTableMapper imageTrackTableMapper;
    @Override
    public void save(ImageTrackTable imageTrackTable){
        imageTrackTableMapper.insert(imageTrackTable);
    }
    @Override
    public List<ImageTrackTable> findByDate(FindByDate findByDate){
        Date beginTime = findByDate.beginTime;
        Date endTime = findByDate.endTime;
        return imageTrackTableMapper.findByDate(beginTime,endTime);
    }

}
